package org.zjx.common.route;


import lombok.SneakyThrows;
import org.zjx.common.entity.Address;

/**
 * 使用飞行符
 */
public class FlyingCharmsRoute extends AbstractRoute {
    public static final String FLY_CITY_CSC = "长寿村";
    public static final String FLY_CITY_XLNG = "西梁女国";
    public static final String FLY_CITY_BXG = "宝象国";
    public static final String FLY_CITY_ZZG = "朱紫国";
    public static final String FLY_CITY_CAC = "长安城";
    public static final String FLY_CITY_JYC = "建邺城";
    public static final String FLY_CITY_ALG = "傲来国";


    public FlyingCharmsRoute() {}

    @SneakyThrows
    public FlyingCharmsRoute(Address startAddress, String cityName) {
        super(startAddress, null, 2);
        if (startAddress == null || cityName.isEmpty()) throw new NullPointerException();
        switch (cityName) {
            case FLY_CITY_CSC:
                endAddress = new Address("长寿村",111,61);
                break;
            case FLY_CITY_XLNG:
                endAddress = new Address("西梁女国",101,28);
                break;
            case FLY_CITY_BXG:
                endAddress = new Address("宝象国",115,70);
                break;
            case FLY_CITY_ZZG:
                endAddress = new Address("朱紫国",140,93);
                break;
            case FLY_CITY_CAC:
                endAddress = new Address("长安城",361,243);
                break;
            case FLY_CITY_JYC:
                endAddress = new Address("建邺城",65,30);
                break;
            case FLY_CITY_ALG:
                endAddress = new Address("傲来国",123,94);
                break;
        }
    }
}
